#include <time.h>
#include "EGCTimeOut.h"

//---------------------------------------------------------
//-- SetTimeOut(uint32 uiTimeOut)
//---------------------------------------------------------
void CEGCTimeOut::SetTimeOut(uint32 uiTimeOut)
{
	m_uiTimeOut = uiTimeOut;
}

//---------------------------------------------------------
//-- Init(uint32 uiTimeOut)
//---------------------------------------------------------
void CEGCTimeOut::Init(uint32 uiTimeOut)
{
	m_sGameMsg = "";
	m_uiTimeOut = uiTimeOut;
}

//---------------------------------------------------------
//-- Done()
//---------------------------------------------------------
void CEGCTimeOut::Done()
{
	CEndGameCondition::Done();
}

//---------------------------------------------------------
//-- bool CheckCondition()
//---------------------------------------------------------
bool CEGCTimeOut::CheckCondition() //COMO ENFOCARLO???
{
	for(unsigned int i=0;i<m_uiTimeOut;i++) //Pasan "m_uiTimeOut" segundos:
	{
		clock_t timeLimit = (clock_t)CLOCKS_PER_SEC + clock();
		//while(timeLimit > clock());
		return true;
	}
	return false;
}